Integrand size = 32, antiderivative size = 334 \[ \int (c i+d i x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2 \, dx=\frac {B^2 (b c-a d)^2 i^2 x}{3 b^2}+\frac {B^2 (b c-a d)^3 i^2 \log \left (\frac {a+b x}{c+d x}\right )}{3 b^3 d}-\frac {2 B (b c-a d)^2 i^2 (a+b x) \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{3 b^3}-\frac {B (b c-a d) i^2 (c+d x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{3 b d}+\frac {i^2 (c+d x)^3 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2}{3 d}+\frac {B^2 (b c-a d)^3 i^2 \log (c+d x)}{b^3 d}+\frac {2 B (b c-a d)^3 i^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right ) \log \left (1-\frac {b (c+d x)}{d (a+b x)}\right )}{3 b^3 d}-\frac {2 B^2 (b c-a d)^3 i^2 \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{d (a+b x)}\right )}{3 b^3 d} \]
[Out]
Time = 0.23 (sec) , antiderivative size = 334, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {2552, 2356, 2389, 2379, 2438, 2351, 31, 46} \[ \int (c i+d i x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2 \, dx=\frac {2 B i^2 (b c-a d)^3 \log \left (1-\frac {b (c+d x)}{d (a+b x)}\right ) \left (B \log \left (\frac {e (a+b x)}{c+d x}\right )+A\right )}{3 b^3 d}-\frac {2 B i^2 (a+b x) (b c-a d)^2 \left (B \log \left (\frac {e (a+b x)}{c+d x}\right )+A\right )}{3 b^3}-\frac {B i^2 (c+d x)^2 (b c-a d) \left (B \log \left (\frac {e (a+b x)}{c+d x}\right )+A\right )}{3 b d}+\frac {i^2 (c+d x)^3 \left (B \log \left (\frac {e (a+b x)}{c+d x}\right )+A\right )^2}{3 d}-\frac {2 B^2 i^2 (b c-a d)^3 \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{d (a+b x)}\right )}{3 b^3 d}+\frac {B^2 i^2 (b c-a d)^3 \log \left (\frac {a+b x}{c+d x}\right )}{3 b^3 d}+\frac {B^2 i^2 (b c-a d)^3 \log (c+d x)}{b^3 d}+\frac {B^2 i^2 x (b c-a d)^2}{3 b^2} \]
[In]
[Out]
Rule 31
Rule 46
Rule 2351
Rule 2356
Rule 2379
Rule 2389
Rule 2438
Rule 2552
Rubi steps \begin{align*} \text {integral}& = \left ((b c-a d)^3 i^2\right ) \text {Subst}\left (\int \frac {(A+B \log (e x))^2}{(b-d x)^4} \, dx,x,\frac {a+b x}{c+d x}\right ) \\ & = \frac {i^2 (c+d x)^3 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2}{3 d}-\frac {\left (2 B (b c-a d)^3 i^2\right ) \text {Subst}\left (\int \frac {A+B \log (e x)}{x (b-d x)^3} \, dx,x,\frac {a+b x}{c+d x}\right )}{3 d} \\ & = \frac {i^2 (c+d x)^3 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2}{3 d}-\frac {\left (2 B (b c-a d)^3 i^2\right ) \text {Subst}\left (\int \frac {A+B \log (e x)}{(b-d x)^3} \, dx,x,\frac {a+b x}{c+d x}\right )}{3 b}-\frac {\left (2 B (b c-a d)^3 i^2\right ) \text {Subst}\left (\int \frac {A+B \log (e x)}{x (b-d x)^2} \, dx,x,\frac {a+b x}{c+d x}\right )}{3 b d} \\ & = -\frac {B (b c-a d) i^2 (c+d x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{3 b d}+\frac {i^2 (c+d x)^3 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2}{3 d}-\frac {\left (2 B (b c-a d)^3 i^2\right ) \text {Subst}\left (\int \frac {A+B \log (e x)}{(b-d x)^2} \, dx,x,\frac {a+b x}{c+d x}\right )}{3 b^2}-\frac {\left (2 B (b c-a d)^3 i^2\right ) \text {Subst}\left (\int \frac {A+B \log (e x)}{x (b-d x)} \, dx,x,\frac {a+b x}{c+d x}\right )}{3 b^2 d}+\frac {\left (B^2 (b c-a d)^3 i^2\right ) \text {Subst}\left (\int \frac {1}{x (b-d x)^2} \, dx,x,\frac {a+b x}{c+d x}\right )}{3 b d} \\ & = -\frac {2 B (b c-a d)^2 i^2 (a+b x) \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{3 b^3}-\frac {B (b c-a d) i^2 (c+d x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{3 b d}+\frac {i^2 (c+d x)^3 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2}{3 d}+\frac {2 B (b c-a d)^3 i^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right ) \log \left (1-\frac {b (c+d x)}{d (a+b x)}\right )}{3 b^3 d}+\frac {\left (2 B^2 (b c-a d)^3 i^2\right ) \text {Subst}\left (\int \frac {1}{b-d x} \, dx,x,\frac {a+b x}{c+d x}\right )}{3 b^3}-\frac {\left (2 B^2 (b c-a d)^3 i^2\right ) \text {Subst}\left (\int \frac {\log \left (1-\frac {b}{d x}\right )}{x} \, dx,x,\frac {a+b x}{c+d x}\right )}{3 b^3 d}+\frac {\left (B^2 (b c-a d)^3 i^2\right ) \text {Subst}\left (\int \left (\frac {1}{b^2 x}+\frac {d}{b (b-d x)^2}+\frac {d}{b^2 (b-d x)}\right ) \, dx,x,\frac {a+b x}{c+d x}\right )}{3 b d} \\ & = \frac {B^2 (b c-a d)^2 i^2 x}{3 b^2}+\frac {B^2 (b c-a d)^3 i^2 \log \left (\frac {a+b x}{c+d x}\right )}{3 b^3 d}-\frac {2 B (b c-a d)^2 i^2 (a+b x) \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{3 b^3}-\frac {B (b c-a d) i^2 (c+d x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{3 b d}+\frac {i^2 (c+d x)^3 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2}{3 d}+\frac {B^2 (b c-a d)^3 i^2 \log (c+d x)}{b^3 d}+\frac {2 B (b c-a d)^3 i^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right ) \log \left (1-\frac {b (c+d x)}{d (a+b x)}\right )}{3 b^3 d}-\frac {2 B^2 (b c-a d)^3 i^2 \text {Li}_2\left (\frac {b (c+d x)}{d (a+b x)}\right )}{3 b^3 d} \\ \end{align*}
Time = 0.13 (sec) , antiderivative size = 287, normalized size of antiderivative = 0.86 \[ \int (c i+d i x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2 \, dx=\frac {i^2 \left ((c+d x)^3 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2-\frac {B (b c-a d) \left (2 A b d (b c-a d) x-B (b c-a d) (b d x+(b c-a d) \log (a+b x))+2 B d (b c-a d) (a+b x) \log \left (\frac {e (a+b x)}{c+d x}\right )+b^2 (c+d x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )+2 (b c-a d)^2 \log (a+b x) \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )-2 B (b c-a d)^2 \log (c+d x)-B (b c-a d)^2 \left (\log (a+b x) \left (\log (a+b x)-2 \log \left (\frac {b (c+d x)}{b c-a d}\right )\right )-2 \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{-b c+a d}\right )\right )\right )}{b^3}\right )}{3 d} \]
[In]
[Out]
\[\int \left (d i x +c i \right )^{2} \left (A +B \ln \left (\frac {e \left (b x +a \right )}{d x +c}\right )\right )^{2}d x\]
[In]
[Out]
\[ \int (c i+d i x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2 \, dx=\int { {\left (d i x + c i\right )}^{2} {\left (B \log \left (\frac {{\left (b x + a\right )} e}{d x + c}\right ) + A\right )}^{2} \,d x } \]
[In]
[Out]
Timed out. \[ \int (c i+d i x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2 \, dx=\text {Timed out} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 1202 vs. \(2 (319) = 638\).
Time = 0.28 (sec) , antiderivative size = 1202, normalized size of antiderivative = 3.60 \[ \int (c i+d i x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2 \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int (c i+d i x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2 \, dx=\int { {\left (d i x + c i\right )}^{2} {\left (B \log \left (\frac {{\left (b x + a\right )} e}{d x + c}\right ) + A\right )}^{2} \,d x } \]
[In]
[Out]
Timed out. \[ \int (c i+d i x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2 \, dx=\int {\left (c\,i+d\,i\,x\right )}^2\,{\left (A+B\,\ln \left (\frac {e\,\left (a+b\,x\right )}{c+d\,x}\right )\right )}^2 \,d x \]
[In]
[Out]